package net.zjitc.service.Impl;

import net.zjitc.dao.Impl.ProductDaoImpl;
import net.zjitc.dao.ProductDao;
import net.zjitc.pojo.Evaluate;
import net.zjitc.pojo.Product;
import net.zjitc.service.ProductService;
import net.zjitc.utils.PageBean;

import java.util.List;

/**
 * Created by Administrator on 2017/11/22.
 */
public class ProductServiceImpl implements ProductService{
    ProductDao productDao=new ProductDaoImpl();
    public PageBean<Product> findPageBean(int page, int pageSize) {
        return productDao.findPageBean(page,pageSize);
    }

    public void productAdd(Product product) {
        productDao.productAdd(product);
    }

    public Product findProductById(String pid) {
        return productDao.findProductById(pid);
    }

    public void productEdit(Product product) {
        productDao.productEdit(product);
    }

    public void productDelete(String pid) {
        productDao.productDelete(pid);
    }

    public List<Product> findAllProduct() {
        return productDao.findAllProduct();
    }

    public PageBean<Product> findPageBeanByCid(int page, int pageSize, int cid) {
        return productDao.findPageBeanByCid(page,pageSize,cid);
    }

    public PageBean<Product> findPageBeanByCsid(int page, int pageSize, int csid) {
        return productDao.findPageBeanByCsid(page,pageSize,csid);
    }

    public List<Evaluate> findEvaluateByPid(String pid) {
        return productDao.findEvaluateByPid(pid);
    }
}
